const path = require ('path'); //路径
export default {
  disableCSSModules: false, //关闭 css modules
  //主题色设置
  theme: {
    'primary-color': '#00B2A9',
  },
  // 插件设置
  plugins: [
    [
      'umi-plugin-react',
      {
        antd: true, //使用antd
        dva: true,
      },
    ],
  ],
  // 路由设置
  routes: [
    {
      path: '/',
      component: 'index', //布局页面
      routes: [
        {
          path: '/',
          component: './home',
          meta: {
            title: '绩效考核',
            thisRoute: [
              {
                path: '/',
                title: '绩效考核',
              },
            ],
          },
        },
      ],
    },
  ],
  // 服务请求设置
  proxy: {
    '/api': {
      target: 'http://jsonplaceholder.typicode.com/',
      changeOrigin: true,
      pathRewrite: {'^/api': ''},
    },
  },
  publicPath: './static/',
  // 公共路径
  alias: {
    '@components': path.resolve (__dirname, 'src/components'),
    '@utils': path.resolve (__dirname, 'src/utils'),
  },
};
